home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
- CREATDB(UNIX) 11/6/79 CREATDB(UNIX)
-
-
-
- NAME
- creatdb - create a data base
-
- SYNOPSIS
- _c_r_e_a_t_d_b [ -_u_n_a_m_e ] [ -_e ] [ -_m ] [ +__c ] [ +__q ] dbname
-
- DESCRIPTION
- Creatdb creates a new INGRES database, or modifies the
- status of an existing database. The person who executes
- this command becomes the Database Administrator (DBA) for
- the database. The DBA has special powers not granted to or-
- dinary users.
-
- _D_b_n_a_m_e is the name of the database to be created. The name
- must be unique among all INGRES users.
-
- The flags +__c and +__q specify options on the database. The
- form +_x turns an option on, while -_x turns an option off.
- The -_c flag turns off the concurrency control scheme (de-
- fault on). The +_q flag turns on query modification (default
- on).
-
- Concurrency control should not be turned off except on data-
- bases which are never accessed by more than one user. This
- applies even if users do not share data relations, since
- system relations are still shared. If the concurrency con-
- trol scheme is not installed in UNIX, or if the special file
- /dev/lock does not exist or is not accessible for read-write
- by INGRES, concurrency control acts as though it is off
- (although it will suddenly come on when the lock driver is
- installed in UNIX).
-
- Query modification must be turned on for the protection, in-
- tegrity, and view subsystems to work, however, the system
- will run slightly slower in some cases if it is turned on.
- It is possible to turn query modification on if it is al-
- ready off in an existing database, but it is not possible to
- turn it off if it is already on.
-
- Databases with query modification turned off create new re-
- lations with all access permitted for all users, instead of
- no access except to the owner, the default for databases
- with query modification enabled.
-
- Database options for an existing database may be modified by
- stating the -_e flag. The database is adjusted to conform to
- the option flags. For example:
-
- creatdb -e +q mydb
-
- turns query modification on for database ``mydb'' (but
- leaves concurrency control alone). Only the database ad-
- ministrator (DBA) may use the -_e flag.
-
- When query modification is turned on, new relations will be
- created with no access, but previously created relations
- will still have all access to everyone. The _d_e_s_t_r_o_y command
- may be used to remove this global permission, after which
- more selective permissions may be specified with the _p_e_r_m_i_t
- command.
-
- The INGRES user may use the -_u flag to specify a different
- DBA: the flag should be immediately followed by the login
- name of the user who should be the DBA.
-
- The -_m flag specifies that the UNIX directory in which the
- database is to reside already exists. This should only be
- needed if the directory if a mounted file system, as might
- occur for a very large database. The directory must exist
- (as .../_d_a_t_a/_b_a_s_e/_d_b_n_a_m_e), must be mode 777, and must be
- empty of all files.
-
- The user who executes this command must have the U_CREATDB
- bit set in the status field of her entry in the users file.
-
- The INGRES superuser can create a file in .../_d_a_t_a/_b_a_s_e con-
- taining a single line which is the full pathname of the lo-
- cation of the database. The file must be owned by INGRES
- and be mode 600. When the database is created, it will be
- created in the file named, rather than in the directory
- .../_d_a_t_a/_b_a_s_e. For example, if the file
- .../_d_a_t_a/_b_a_s_e/_e_r_i_c_d_b contained the line
-
- /mnt/eric/database
-
- then the database called ``ericdb'' would be physically
- stored in the directory /mnt/eric/database rather than in
- the directory .../data/base/ericdb.
-
- EXAMPLE
- creatdb demo
- creatdb -ueric -q erics_db
- creatdb -e +q -c -u:av erics_db
-
- FILES
- .../files/dbtmplt7
- .../files/data/base/*
- .../files/datadir/* (for compatibility with previous ver-
- sions)
-
- SEE ALSO
- demodb(unix), destroydb(unix), users(files), chmod(I),
- destroydb(quel), permit(quel)
-
- DIAGNOSTICS
- No database name specified.
- You have not specified the name of the database to
- create (or modify) with the command.
- You may not access this database
- Your entry in the users file says you are not authorized
- to access this database.
- You are not a valid INGRES user
- You do not have a users file entry, and can not do any-
- thing with INGRES at all.
- You are not allowed this command
- The U_CREATDB bit is not set in your users file entry.
- You may not use the -u flag
- Only the INGRES superuser may become someone else.
- <name> does not exist
- With -_e or -_m, the directory does not exist.
- <name> already exists
- Without either -_e or -_m, the database (actually, the
- directory) already exists.
- <name> is not empty
- With the -_m flag, the directory you named must be empty.
- You are not the DBA for this database
- With the -_e flag, you must be the database administra-
- tor.
-
-